Open Bug 1930776 Opened 7 months ago Updated 1 month ago

Implement userScripts.execute

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wecg][addons-jira])

This bug tracks our implementation of userScripts.execute as specified in https://github.com/w3c/webextensions/blob/main/proposals/user-scripts-execute-api.md (added in https://github.com/w3c/webextensions/pull/540).

This was mentioned before as the end of the list at https://bugzilla.mozilla.org/show_bug.cgi?id=1875475#c3 (and is not part of the MVP).

Chrome has not implemented this yet. I cannot even find an issue on bugs.chromium.org that tracks an implementation.

Severity: -- → N/A
Priority: -- → P3

Related Chromium bug seems to be private:
https://issues.chromium.org/issues/382190916
https://issues.chromium.org/issues/326657581

Status: Duplicate of 326657581

This is already planned, hopefully can be done in Q1 2025.

The current proposal specifies userScripts.execute to take one script only, and I wonder whether it should be an array instead: https://github.com/w3c/webextensions/issues/477#issuecomment-2561976716

Furthermore, userScripts.execute also accepts documentId to make sure that the script is executed in the desired document. This has not been implemented in Firefox yet, bug 1891478 tracks documentId work.

There is another pending query on the expected behavior: https://github.com/w3c/webextensions/pull/745#pullrequestreview-2556289504

Whiteboard: [wecg] → [wecg][addons-jira]

Note, for BCD when userScripts.execute is documented as part of dev-doc-needed:

Chrome has enabled userScripts.execute in Chrome version 135.
Commit: https://chromium.googlesource.com/chromium/src/+/47209ae4c98108dae21d9a52031e504547bf964e
Version: https://chromium.googlesource.com/chromium/src/+/47209ae4c98108dae21d9a52031e504547bf964e/chrome/VERSION

Duplicate of this bug: 1516478
You need to log in before you can comment on or make changes to this bug.